home *** CD-ROM | disk | FTP | other *** search
GW-BASIC | 1984-04-24 | 4.9 KB | 165 lines |
- 10 CLEAR:CLS:KEY OFF:WIDTH 80
- 20 '
- 30 PRINT "The instruction are in `REM'! Read them and delete this line !!"
- 40 '
- 50 ' The instruction are really easy. The computer will give you two lists.
- 60 ' On the list is a number followed by a football play. Example: 20 Bomb
- 70 ' Print each list on your printer. If you do not have a printer then just
- 80 ' copy it on a piece of paper. Give one list to your opponent. Each list
- 90 ' has different numbers on it for each play. Then when the computer askes
- 100 ' for `Input offensive play, defensive play?' each player enter the number
- 110 ' of the play they want, offensive player first , with a comma seperating
- 120 ' the plays. HAVE FUN!!
- 130 PRINT:RANDOMIZE
- 140 DIM A(20),B(20),C(40),H(2),T(2),W(2),X(2),Y(2),Z(2),M$(2),D(2),P$(20)
- 150 PRINT:INPUT "Please input score limit on game";E
- 160 FOR I=1 TO 40:READ N:IF I>20 THEN 180
- 170 A(N)=I:GOTO 190
- 180 B(N)=I-20
- 190 C(I)=N:NEXT I
- 200 FOR I=1 TO 20:READ P$(I):NEXT I
- 210 L=0:T=1
- 220 PRINT "Team"T"Play chart"
- 230 PRINT "No. Play"
- 240 FOR I=1 TO 20
- 250 '
- 260 PRINT C(I+L);TAB(6);P$(I)
- 270 NEXT I
- 280 L=L+20:T=2
- 290 PRINT "*** Press any key to continue ***"
- 300 A$=INKEY$:IF A$="" THEN 300
- 310 FOR X=1 TO 11:PRINT:NEXT X
- 320 FOR Z=1 TO 3000:NEXT Z
- 330 IF L=20 THEN 220
- 340 D(1)=0:D(2)=3:M$(1)="--->":M$(2)="<---"
- 350 H(1)=0:H(2)=0:T(1)=2:T(2)=1
- 360 W(1)=-1:W(2)=1:X(1)=100:X(2)=0
- 370 Y(1)=1:Y(2)=-1:Z(1)=0:Z(2)=100
- 380 GOSUB 1610
- 390 PRINT "Team 1 defends 0 yd goal -- Team 2 defends 100 yd goal."
- 400 T=INT(2*RND(1)+1)
- 410 PRINT:PRINT "The coin is flipped"
- 420 P=X(T)-Y(T)*40
- 430 P=P-Y(T)*K
- 440 IF W(T)*P<Z(T)+10 THEN 470
- 450 PRINT:PRINT "Ball went out of endzone --Automatic Touchback--"
- 460 GOTO 520
- 470 PRINT "Ball went"K"yards. Now on"P:GOSUB 1600
- 480 PRINT "Team"T"do you want to runback";:INPUT A$
- 490 IF LEFT$(A$,1)="y" THEN 1210
- 500 IF LEFT$(A$,1)<>"n" THEN 480
- 510 IF W(T)*P<Z(T) THEN 530
- 520 P=Z(T)-W(T)*20
- 530 D=1:S=P
- 540 FOR I=1 TO 72:PRINT "=";:NEXT I
- 550 PRINT:PRINT "Team"T"down"D"on"P
- 560 IF D<>1 THEN 600
- 570 IF Y(T)*(P+Y(T)*10)>=X(T) THEN 590
- 580 C=4:GOTO 600
- 590 C=8
- 600 IF C=8 THEN 630
- 610 PRINT TAB(27);10-(Y(T)*P-Y(T)*S)"yards to 1st down"
- 620 GOTO 640
- 630 PRINT TAB(27);X(T)-Y(T)*P"yards"
- 640 GOSUB 1600:IF D=4 THEN 1020
- 650 '
- 660 U=INT(3*RND(0)-1):GOTO 680
- 670 PRINT "Illegal play number, check and"
- 680 PRINT "Input offensive play, defensive play";
- 690 IF T=2 THEN 710
- 700 INPUT P1,P2:GOTO 720
- 710 INPUT P2,P1
- 720 IF P1=77 THEN 1020
- 730 IF P1>20 THEN 1500
- 740 IF P1<1 THEN 1500
- 750 IF P2>20 THEN 1500
- 760 IF P2<1 THEN 1500
- 770 P1=INT(P1):P2=INT(P2)
- 780 Y=INT(ABS(A(P1)-B(P2))/19*((X(T)-Y(T)*P+25)*RND(1)-15))
- 790 PRINT:IF T=2 THEN 820
- 800 IF A(P1)<11 THEN 900
- 810 GOTO 830
- 820 IF B(P2)<11 THEN 900
- 830 IF U<>0 THEN 860
- 840 PRINT "Pass incomplete team"T
- 850 Y=0:GOTO 910
- 860 G=RND(1):IF G>0.025 THEN 880
- 870 IF Y>2 THEN 890
- 880 PRINT "Quarterback scramble":GOTO 910
- 890 PRINT "Pass complete":GOTO 910
- 900 PRINT "The ball was run"
- 910 P=P-W(T)*Y
- 920 PRINT:PRINT "Net yards gained on down"D"are"Y
- 930 G=RND(1):IF G>0.025 THEN 960
- 940 PRINT:PRINT "** Loss of possession from team"T"to team"T(T)
- 950 GOSUB 1570:PRINT:T=T(T):GOTO 480
- 960 IF Y(T)*P>=X(T) THEN 1150
- 970 IF W(T)*P>=Z(T) THEN 1110
- 980 IF Y(T)*P-Y(T)*S>=10 THEN 530
- 990 D=D+1:IF D<>5 THEN 540
- 1000 PRINT:PRINT "Conversion unsuccessful team"T:T=T(T)
- 1010 GOSUB 1570:GOTO 530
- 1020 PRINT "Does team"T"want to punt";:INPUT A$
- 1030 IF LEFT$(A$,1)="n" THEN 1070
- 1040 IF LEFT$(A$,1)<>"y" THEN 1020
- 1050 PRINT:PRINT "Team"T"will punt":G=RND(1):IF G>0.025 THEN 940
- 1060 GOSUB 1570:K=INT(25*RND(1)+35):T=T(T):GOTO 430
- 1070 PRINT "Does team"T"want to attempt a field goal";:INPUT A$
- 1080 IF LEFT$(A$,1)="y" THEN 1290
- 1090 IF LEFT$(A$,1)<>"n" THEN 1070
- 1100 GOTO 650
- 1110 PRINT:PRINT "Safety against team"T"********************** OH-OH"
- 1120 H(T(T))=H(T(T))+2:GOSUB 1510
- 1130 PRINT "Team"T"do you want to punt instead of a kickoff";:INPUT A$
- 1140 P=Z(T)-W(T)*20:IF LEFT$(A$,1)="y" THEN 1050
- 1150 PRINT:PRINT "Touchdown by team"T"************************* "YEA TEAM"
- 1160 Q=7:G=RND(1):IF G>0.1 THEN 1180
- 1170 Q=6:PRINT "Extra point no good":GOTO 1190
- 1180 PRINT "Extra point good!"
- 1190 H(T)=H(T)+Q:GOSUB 1510
- 1200 T=T(T):GOTO 420
- 1210 K=INT(9*RND(1)+1)
- 1220 R=INT(((X(T)-Y(T)*P+25)*RND(1)-15)/K)
- 1230 P=P-W(T)*R
- 1240 PRINT:PRINT "Runback team"T;R"yards."
- 1250 G=RND(1):IF G<0.025 THEN 940
- 1260 IF Y(T)*P>=X(T) THEN 1150
- 1270 IF W(T)*P>=Z(T) THEN 1110
- 1280 GOTO 530
- 1290 PRINT:PRINT "Team"T"will attempt a field goal"
- 1300 G=RND(1):IF G<0.025 THEN 940
- 1310 F=INT(35*RND(1)+20)
- 1320 PRINT:PRINT "Kick is"F"yards long"
- 1330 P=P-W(T)*F:G=RND(1)
- 1340 IF G>0.35 THEN 1380
- 1350 IF Y(T)*P<X(T) THEN 1390
- 1360 PRINT "Field goal good for team"T"********************** Way to go!"
- 1370 Q=3:GOTO 1190
- 1380 PRINT "Ball went wide"
- 1390 PRINT "Field goal unsuccesful team"T"------------------- Too bad"
- 1400 GOSUB 1570:IF Y(T)*P<X(T)+10 THEN 1420
- 1410 T=T(T):GOTO 440
- 1420 PRINT:PRINT "Ball now on"P
- 1430 T=T(T):GOSUB 1600:GOTO 480
- 1440 DATA 17,11,6,19,10,1,8,15,9,2,7,5,4,18,16,20,13,12,14,3
- 1450 DATA 9,17,18,10,4,3,12,15,11,5,7,14,19,20,16,2,6,8,1,13
- 1460 DATA Pitchout,Triple Reverse,Draw,QB Sneak,End Around,Double Reverse
- 1470 DATA Left Sweep,Right Sweep,Off Tackle,Wishbone Option,Flare Pass
- 1480 DATA Screen Pass,Roll Out Option,Right Curl,Left Curl,Wishbone Option
- 1490 DATA Sideline Pass,Half-Back Option,Razzle-Dazzle,The Bomb
- 1500 IF P1<>99 THEN 670
- 1510 PRINT:PRINT "Team 1 score is"H(1)
- 1520 PRINT "Team 2 score is"H(2):PRINT
- 1530 IF H(T)<E THEN 1550
- 1540 PRINT "Team"T"wins ***************":GOTO 1640
- 1550 IF P1=99 THEN 680
- 1560 RETURN
- 1570 PRINT
- 1580 FOR X=1 TO 72:PRINT "+";:NEXT X:PRINT
- 1590 RETURN
- 1600 PRINT TAB(D(T)+5+P/2);M$(T)
- 1610 PRINT "Team 1 [0 10 20 30 40 50 60 70 80 90 100] Team 2"
- 1620 PRINT
- 1630 RETURN
- 1640 END
-